package com.shuwen.gcdj.mapper.mysql;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shuwen.gcdj.bean.dept.request.DeptListReq;
import com.shuwen.gcdj.bean.dept.response.DeptListItemResp;
import com.shuwen.gcdj.entity.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 部门组织架构(t_user_department)数据Mapper
 *
 * @author localhost_ubuntu
 * @description created by mybaits plus code generator
 * @since 2021-11-24 21:56:05
 */
@Mapper
public interface DepartmentMapper extends BaseMapper<Department> {
    /**
     * 分页获取部门列表
     *
     * @param page Page<DeptListItemResp>
     * @param bean DeptListReq
     * @return IPage<DeptListItemResp>
     */
    IPage<DeptListItemResp> getPagingList(Page<DeptListItemResp> page, @Param("bean") DeptListReq bean);

    /**
     * 获取所有部门
     *
     * @return IPage<DeptListItemResp>
     */
    List<DeptListItemResp> getAllList();

    /**
     * 根据code
     *
     * @return List<DeptListItemResp>
     */
    List<DeptListItemResp> getDeptListById(@Param("id") String id);
}
